#ifndef _LORA_H_
#define _LORA_H_
#include "radio.h"
#include "sx1280.h"
#include "example.h"

#define  TX_DEBUG
#define FIRMWARE_VERSION    ( ( char* )"Firmware Version: 5709de2d" )
#define MODE_LORA
#define RF_BL_ADV_CHANNEL_38             			2426000000 // Hz
#define RF_BL_ADV_CHANNEL_0                     	2406000000 // Hz
#define RF_FREQUENCY                                RF_BL_ADV_CHANNEL_0 // Hz
#define TX_OUTPUT_POWER                             13
#define BUFFER_SIZE                                 255
#define TX_TIMEOUT_VALUE                            0 // ms
#define RX_TIMEOUT_VALUE                            0 // ms
#define RX_TIMEOUT_TICK_SIZE                        RADIO_TICK_SIZE_1000_US
#define PINGPONGSIZE                                4
typedef enum
{
    APP_LOWPOWER,
    APP_RX,
    APP_RX_TIMEOUT,
    APP_RX_ERROR,
    APP_TX,
    APP_TX_TIMEOUT,
}AppStates_t;


extern void sx1280_int(void);
extern uint8_t rf_receive(uint8_t *data, uint16_t timeout_ms);
extern uint8_t rf_transmit(uint8_t *data, uint8_t length,  uint16_t timeout_ms);
#endif